projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
accdf06
)
[XEN][POWERPC] Fix garbage dom0 commandline.
author
Hollis Blanchard
<hollisb@us.ibm.com>
Thu, 12 Apr 2007 15:42:43 +0000
(10:42 -0500)
committer
Hollis Blanchard
<hollisb@us.ibm.com>
Thu, 12 Apr 2007 15:42:43 +0000
(10:42 -0500)
Debugged by Amos Waterland <apw@us.ibm.com>.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
xen/arch/powerpc/ofd_fixup.c
patch
|
blob
|
history
diff --git
a/xen/arch/powerpc/ofd_fixup.c
b/xen/arch/powerpc/ofd_fixup.c
index 453ce4be17979ca0c8856602f6551ef5c4b509c0..2d2ff112447bccbac56d2ba540f82ae34ad64a07 100644
(file)
--- a/
xen/arch/powerpc/ofd_fixup.c
+++ b/
xen/arch/powerpc/ofd_fixup.c
@@
-264,7
+264,7
@@
static ofdn_t ofd_chosen_props(void *m, const char *cmdline)
ofdn_t n;
ofdn_t p;
static const char path[] = "/chosen";
- char bootargs[256];
+ char bootargs[256]
= { 0, }
;
int bsz;
int sz;
int rm;
@@
-276,7
+276,8
@@
static ofdn_t ofd_chosen_props(void *m, const char *cmdline)
&path[1], sizeof (path) - 1);
}
- strlcpy(bootargs, cmdline, sizeof(bootargs));
+ if (cmdline)
+ strlcpy(bootargs, cmdline, sizeof(bootargs));
bsz = strlen(bootargs) + 1;
rm = sizeof (bootargs) - bsz;